cfg

E = figure
hold on
grid on
xlabel('t[ms]')
ylabel('E[V/m]');
H = figure
hold on
grid on
xlabel('t[ms]')
ylabel('H[A/m]')
colors = {'r', 'g', 'b', 'c', 'm', 'y', 'k'};
Ec = 1
Hc = 1
for k = 1:length(signals)
	field = signals{k,1};
	name = signals{k,2};
	filename = signals{k,3};
	if strcmp(field, 'E')
		figure(E)
		cl = colors{Ec};
		Ec += 1
	else
		figure(H)
		cl = colors{Hc};
		Hc += 1
	end
	load([filename, '.dat'])
	eval(['sig = ', filename, ';'])
	
	plot(sig(:,1)*1000, sig(:,2), [cl, ';', name, ';']);
end
figure(E)
print('-depsc', 'Ezagagulja.eps');
figure(H)
print('-depsc', 'Hzagagulja.eps');



